package touchtrack.exception;

/**
 * IllegalDuplicationException
 * 
 * Exception class.
 * Thrown when a duplicate item has been detected.
 * 
 * @author	MuMe09 team 6
 * 			http://mumetech.wordpress.com/
 */
public class IllegalDuplicationException extends Throwable 
{
	/**
	 * Initializes an IllegalDuplicationException with the given description.
	 * 
	 * @param	description
	 * @effect	Sets the description.
	 */
	public IllegalDuplicationException(String description)
	{
		this.description = description;
	}

	/**
	 * Returns an error message that can be used in the UI.
	 * 
	 * @return	An error message.
	 */
	public String toString()
	{
		return "The following item already exists: " + this.description;
	}
	
	private String description;
	private static final long serialVersionUID = 1L;
}